All Functions of Week 5

ifelse

{base}

Return a or b depending on the value of test

library

{base}

Load an R package

element_blank

{GGPLOT2}

This theme element draws nothing, and assigns no space

arrow

{GGPLOT2}

Draw an arrow in a ggplot graph

geom_ribbon

{GGPLOT2}

Generates an area plot

summary

{base}

Obtain summary statistics or detailed regression output

read.csv

{utils}

Read a csv file to data frame. Specify stringsAsFactors = FALSE to keep all string columns as characters

data.frame

{base}

Create a data.frame from vectors

element_text

{GGPLOT2}

Customise text in GGPLOT2

ylab

{GGPLOT2}

Label the y axis (ggplot)

scale_x_continuous

{GGPLOT2}

Customise continuous x axis

theme

{GGPLOT2}

Set theme for GGPLOT2

dnorm

{stats}

Density distribution for the normal distribution

setwd

{base}

Set Working Directory

with

{base}

evaluate expression in the context of a data frame

expression

{base}

Used in plots to add symbols to axes

theme_classic

{GGPLOT2}

A minimalistic theme with no gridlines

geom_point

{GGPLOT2}

Generates a scatter plot

t.test

{stats}

Performs one and two sample t-tests on vectors of data.

xlab

{GGPLOT2}

Label the x axis (ggplot)

aes

{GGPLOT2}

Construct aesthetic mapping of a ggplot graph

subset

{base}

Return subsets of vectors, matrices or data frames which meet conditions.

scale_y_continuous

{GGPLOT2}

Customise continuous y axis

c

{base}

Combine values/vectors into a vector

set.seed

{base}

Initialise a pseudorandom number generator.

bar

{base}

Used for annotations, such as “expression(paste(”-“,bar(y)))”

geom_density

{GGPLOT2}

Generates a density plot

geom_segment

{GGPLOT2}

Generates a line segment or curve

sample_n

{dplyr}

Sample a number of observations from a data frame

seq

{base}

Create a sequence

ggplot

{GGPLOT2}

Create a ggplot graph

The end!